﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="aboutTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Feature Request
</asp:Content>

<asp:Content ID="aboutContent" ContentPlaceHolderID="MainContent" runat="server">
    <h2>Lab 1: Add field to list</h2>
    <p>You will see a list of customers on the 
       "<%= Html.ActionLink("Execute the Code tab", "Execute") %>" 
       <b>Your job is to add the customer contact name to this list (in other words, 
       the table will have two columns; the first is the existing customer name, the 
       second will be a new column which you add with the customer contact name).</b> The 
       database administrator has already added the dbo.Customers.ContactName column to 
       the database for you.</p>
    <h3>Running the Solution</h3>
    <p>This solution has a number of prerequisites, which you will need to set up before 
       you can run it. Many developer machines will already have all of these things 
       installed, but you will still need to change the connect string in the web.config 
       file.</p>
    <ul>
        <li>You need some version of Microsoft SQL Server. The free Developer or Express 
            editions are fine. SQL Server 2005 or 2008 is recommended.</li>
        <li>You need the <a href="http://www.microsoft.com/Downloads/details.aspx?FamilyID=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en">Northwind 
            sample database</a>. You will need to add this database 
            to your SQL Server installation.</li>
        <li>You need <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=d3f06bb9-5f5f-4f46-91e9-813b3fce2db1&displaylang=en">ASP.NET MVC 2 Preview 2</a>.</li>
        <li>You need to modify the connectionString in the web.config file to point to 
            the SQL Server installation on which you have installed Northwind.</li>            
    </ul>
    <h4>Connection string</h4>
    <p>There are two different web.config files in the solution. One is in the 
       MvcApplication1 folder, and the second is in the MvcApplication1/Views folder. 
       The first one is the one which has the connection string which you need to change. 
       </p>
    <p>Note that 
        this is an Entity Framework connection string, so it looks slightly different 
        than a non-Entity Framework connection string. (Essentially, an Entity 
        Framework connection string is a string with a bunch of Entity 
        Framework-specific stuff, plus a "Provider connection string" embedded 
        inside. It's the Provider which you need to change; you need to 
        correct the server name, and you may need to change the authentication method, 
        depending upon how you have configured SQL Server.) I will refer you to 
        the <a href="http://msdn.microsoft.com/en-us/library/cc716756.aspx">MSDN 
        documentation on Entity Framework connection strings</a>. The way to test to 
        see if you've got this right is to just run the application; if you see the 
        homepage, and no errors, then you've got the connection string right.</p>
    <p>The connectionString looks like this:</p>
    <pre><code>&lt;add name="NorthwindEntities" 
        connectionString="metadata=res://*/Models.Model.csdl|res://*/Models.Model.ssdl|res://*/Models.Model.msl;provider=System.Data.SqlClient;
            provider connection string=&amp;quot;<span style="color: Red;"><b>Data Source=DSK-CSTUNTZ\SQLDEV2005;Initial Catalog=Northwind;Integrated Security=True;</b></span>MultipleActiveResultSets=True&amp;quot;" 
            providerName="System.Data.EntityClient"/&gt;</code></pre>
    <p>The part in <span style="color: Red;"><b>red boldface</b></span> is the part you need to change.</p>
</asp:Content>
